<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function getmax(a, b,) {
            if (a > b) {
                return a;
            } else {
                return b;
            }
        }
        console.log(getmax(2, 8));


        function getmax1(a, b,) {
            //三元运算符
            return a > b ? a : b
        }
        console.log(getmax1(2, 9));
    </script>
</head>

<body>

</body>

</html>